package com.yxinsur.imc.business.events.publisher;

import com.yxinsur.imc.business.events.event.SysOrgCreateEvent;
import com.yxinsur.imc.common.core.domain.entity.SysOrg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

@Component
public class SysOrgCreateEventPublisher {
    @Autowired
    private ApplicationContext applicationContext;

    public void pushlish(String msg, SysOrg sysOrg){
        applicationContext.publishEvent(new SysOrgCreateEvent(this, msg,sysOrg));
    }
}
